package interview.Sorting;

public class SelectionSort {
	public static void sort (int[] num){
		int min,pos;
		for (int i=0;i<num.length-1;i++){
			min = num[i];
			pos=i;
			for(int j=i+1;j<num.length;j++){
				if(min>num[j]) {
					min = num[j];
					pos=j;
				}
			}
			Generic.swap(num, i, pos);
			Generic.printArray(num);
		}
	}
}
